﻿using System;

namespace Marmat.Forms
{
    internal partial class DateTimePicker_PopupControl : PopupControl
    {
        public DateTimePicker_PopupControl()
        {
            InitializeComponent();

        }

        protected override void OnLoaded()
        {
            base.OnLoaded();
        }

        private void C1Button1_Click(object sender, EventArgs e)
        {
            this.Value = DateTime.Now;
            this.CloseDropDown();
        }

        private void C1Button2_Click(object sender, EventArgs e)
        {
            this.Value = null;
            this.CloseDropDown();
        }

        private void CalendarControl1_DateTimeCommit(object sender, EventArgs e)
        {
            this.Value = this.calendarControl1.EditValue;
            this.CloseDropDown();
        }
    }
}